#pragma once

namespace Chess {

	using namespace System;
	using namespace System::ComponentModel;
	using namespace System::Collections;
	using namespace System::Windows::Forms;
	using namespace System::Data;
	using namespace System::Drawing;

	/// <summary>
	/// Summary for NewGame
	/// </summary>
	public ref class NewGame : public System::Windows::Forms::Form
	{
	public:
		NewGame(void)
		{
			InitializeComponent();
			//
			//TODO: Add the constructor code here
			//
		}

		int Mode() 
		{
			return rdbAgainst->Checked ? 1 : 2;
		}

		int TimeLimit()
		{
			return (int)numericUpDown1->Value;
		}

	protected:
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		~NewGame()
		{
			if (components)
			{
				delete components;
			}
		}
	private: System::Windows::Forms::Button^  btnOK;
	protected: 
	private: System::Windows::Forms::RadioButton^  rdbAgainst;
	private: System::Windows::Forms::RadioButton^  rdb2Plr;
	private: System::Windows::Forms::NumericUpDown^  numericUpDown1;
	private: System::Windows::Forms::Label^  label1;
	private: System::Windows::Forms::Label^  label2;

	private:
		/// <summary>
		/// Required designer variable.
		/// </summary>
		System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		void InitializeComponent(void)
		{
			this->btnOK = (gcnew System::Windows::Forms::Button());
			this->rdbAgainst = (gcnew System::Windows::Forms::RadioButton());
			this->rdb2Plr = (gcnew System::Windows::Forms::RadioButton());
			this->numericUpDown1 = (gcnew System::Windows::Forms::NumericUpDown());
			this->label1 = (gcnew System::Windows::Forms::Label());
			this->label2 = (gcnew System::Windows::Forms::Label());
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->numericUpDown1))->BeginInit();
			this->SuspendLayout();
			// 
			// btnOK
			// 
			this->btnOK->Location = System::Drawing::Point(287, 110);
			this->btnOK->Name = L"btnOK";
			this->btnOK->Size = System::Drawing::Size(75, 23);
			this->btnOK->TabIndex = 0;
			this->btnOK->Text = L"OK";
			this->btnOK->UseVisualStyleBackColor = true;
			this->btnOK->Click += gcnew System::EventHandler(this, &NewGame::btnOK_Click);
			// 
			// rdbAgainst
			// 
			this->rdbAgainst->AutoSize = true;
			this->rdbAgainst->Checked = true;
			this->rdbAgainst->Location = System::Drawing::Point(26, 21);
			this->rdbAgainst->Name = L"rdbAgainst";
			this->rdbAgainst->Size = System::Drawing::Size(155, 17);
			this->rdbAgainst->TabIndex = 2;
			this->rdbAgainst->TabStop = true;
			this->rdbAgainst->Text = L"1 Player (Against Computer)";
			this->rdbAgainst->UseVisualStyleBackColor = true;
			// 
			// rdb2Plr
			// 
			this->rdb2Plr->AutoSize = true;
			this->rdb2Plr->Location = System::Drawing::Point(223, 21);
			this->rdb2Plr->Name = L"rdb2Plr";
			this->rdb2Plr->Size = System::Drawing::Size(63, 17);
			this->rdb2Plr->TabIndex = 3;
			this->rdb2Plr->Text = L"2 Player";
			this->rdb2Plr->UseVisualStyleBackColor = true;
			// 
			// numericUpDown1
			// 
			this->numericUpDown1->Location = System::Drawing::Point(107, 73);
			this->numericUpDown1->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) {300, 0, 0, 0});
			this->numericUpDown1->Name = L"numericUpDown1";
			this->numericUpDown1->Size = System::Drawing::Size(74, 20);
			this->numericUpDown1->TabIndex = 4;
			// 
			// label1
			// 
			this->label1->AutoSize = true;
			this->label1->Location = System::Drawing::Point(23, 75);
			this->label1->Name = L"label1";
			this->label1->Size = System::Drawing::Size(57, 13);
			this->label1->TabIndex = 5;
			this->label1->Text = L"Time Limit:";
			// 
			// label2
			// 
			this->label2->AutoSize = true;
			this->label2->Location = System::Drawing::Point(187, 75);
			this->label2->Name = L"label2";
			this->label2->Size = System::Drawing::Size(81, 13);
			this->label2->TabIndex = 6;
			this->label2->Text = L"mins (0: no limit)";
			// 
			// NewGame
			// 
			this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
			this->ClientSize = System::Drawing::Size(374, 148);
			this->Controls->Add(this->label2);
			this->Controls->Add(this->label1);
			this->Controls->Add(this->numericUpDown1);
			this->Controls->Add(this->rdb2Plr);
			this->Controls->Add(this->rdbAgainst);
			this->Controls->Add(this->btnOK);
			this->Name = L"NewGame";
			this->Text = L"New Game";
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->numericUpDown1))->EndInit();
			this->ResumeLayout(false);
			this->PerformLayout();

		}
#pragma endregion
	

private: System::Void btnOK_Click(System::Object^  sender, System::EventArgs^  e) 
		 {
			 this->DialogResult = System::Windows::Forms::DialogResult::OK;
			 this->Close();
		 }
};
}
